from django.urls import path
from .views_location import LocationViewSet

urlpatterns = [
    path('location/update/', LocationViewSet.as_view({'post': 'update_location'}), name='update_location'),
    path('location/my/', LocationViewSet.as_view({'get': 'my_location'}), name='get_my_location'),
    path('service-area/add/', LocationViewSet.as_view({'post': 'add_service_area'}), name='add_service_area'),
    path('service-area/list/', LocationViewSet.as_view({'get': 'service_areas'}), name='get_service_areas'),
    path('service-area/<int:pk>/delete/', LocationViewSet.as_view({'delete': 'delete_service_area'}), name='delete_service_area'),
    path('nearby/', LocationViewSet.as_view({'get': 'nearby'}), name='get_nearby_technicians'),
    path('location/history/', LocationViewSet.as_view({'get': 'location_history'}), name='get_location_history'),
]